'use strict';

const { Controller } = require('egg');
const Response = require('../utils/Response')


class BackController extends Controller {
  // async index() {
  //   const { ctx } = this;
  //   ctx.body = 'hi, egg';
  // }
  async getInfo() {
    let { ctx, service } = this
    let { name } = ctx.query
    if (!name) {
      ctx.body = new Response(400, "请先输入名称", "请先输入名称")

    } else {
      let res = await service.back.getInfo(name)
      ctx.body = new Response(200, res, "")
    }


  }
}

module.exports = BackController;